//
//  KKPreviewController.m
//  KKDocuments
//
//  Created by Mac mini on 16/2/2.
//  Copyright © 2016年 JuniorCodingPerson. All rights reserved.
//

#import "KKPreviewController.h"

@implementation KKPreviewController

- (void)viewDidLoad {
    [super loadView];
    
    self.delegate = self;
    self.dataSource = self;
}

#pragma mark - 

- (NSInteger) numberOfPreviewItemsInPreviewController: (QLPreviewController *) controller {
    return 1;
}

- (id <QLPreviewItem>)previewController: (QLPreviewController *)controller previewItemAtIndex:(NSInteger)index {
    
    return [NSURL fileURLWithPath: [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: _kk_fileName]];
}

@end
